/*
package com.zhongkai.service.listener;

import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.zhongkai.Bean.UnitStartBean;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;
import java.io.IOException;

public class NettyMessage implements MessageListener {

*/
/*    @Autowired
    private DeviceOperationService deviceOperationService;*//*


    @Override
    public void onMessage(Message message) {

        try {
            TextMessage textMessage = (TextMessage) message;
            //取消息内容
            String json = textMessage.getText();

            if (json.contains("UnitStartBean:")){
                json = json.replace("UnitStartBean:","");

                ObjectMapper mapper = new ObjectMapper();

                UnitStartBean unitStartBean  =  mapper.readValue(json,UnitStartBean.class);

*/
/*                deviceOperationService.deviceAdd(
                        unitStartBean.getUnit_uuid(),
                        unitStartBean.getUnit_ip(),
                        unitStartBean.getSet_status(),
                        unitStartBean.getIs_warning(),
                        unitStartBean.getBattery(),
                        unitStartBean.getVersions(),
                        unitStartBean.getNumber()
                        );*//*

            }

        } catch (JMSException e) {
            e.printStackTrace();
        } catch (JsonParseException e) {
            e.printStackTrace();
        } catch (JsonMappingException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
*/
